//
//  IMITimer.h
//  MiHome
//
//  Created by 阎超 on 28/07/2017.
//  Copyright © 2017 小米移动软件. All rights reserved.
//

#ifndef ILTimer_h
#define ILTimer_h

#import <Foundation/Foundation.h>
#import "IMISingleton.h"

typedef void (^ timerBlock)(id info);

@interface ILTimer : NSObject

IMI_SINGLETON_H

- (int)pauseTimerWithId:(NSString*)timerId;
- (int)resumeTimerWithId:(NSString*)timerId;
- (int)fireTimerWithId:(NSString*)timerId;
- (void)addTimerWithId:(NSString*)timerId
             withDelay:(NSTimeInterval)delay
          withUserInfo:(id)info
            withRepeat:(BOOL)repeat
        withMainThread:(BOOL)main
           withFireNow:(BOOL)immediately
             withBlock:(timerBlock)block;
- (int)removeTimerWithId:(NSString*)timerId;
- (BOOL)getTimerIsExist:(NSString*)timerId;

@end

#endif /* IMITimer_h */
